//
//  CYXTTXView.m
//  CreditAddressBook
//
//  Created by Lee on 15/9/21.
//  Copyright © 2015年 Lee. All rights reserved.
//

#import "CYXTTXView.h"

@interface CYXTTXView ()

@property (weak, nonatomic) IBOutlet UIImageView *headImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@end

@implementation CYXTTXView

+ (CYXTTXView *)ttView {
    CYXTTXView *view = [[[NSBundle mainBundle] loadNibNamed:@"CYXTTXView" owner:nil options:nil] lastObject];
    return view;
}

- (void)setImage:(UIImage *)image {
    _image = image;
    
    self.headImageView.image = image;
    self.headImageView.layer.masksToBounds = YES;
    self.headImageView.layer.cornerRadius = 50;
    self.headImageView.layer.borderColor = [UIColor whiteColor].CGColor;
    self.headImageView.layer.borderWidth = 4;
}

- (void)setName:(NSString *)name {
    self.nameLabel.text = self.name;
}

@end
